package main

import (
	"fmt"
)

var fibMap = map[int]int{
	0: 0, 1: 1, 2: 1,
}

func fib(n int) int {
	if t, ok := fibMap[n]; ok {
		return t
	}
	fibMap[n] = fib(n-1) + fib(n-2)
	return fibMap[n]
}

func main() {
	fmt.Println(fib(8))
}
